package org.springframework;

import org.springframework.component.TestBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 基于 resource 下 xml 构建 spring 容器
 */
public class ClassPathXmlApplicationContextDemo {

	private static void test1(){
		ApplicationContext context = new ClassPathXmlApplicationContext("config.xml");
		TestBean bean = context.getBean(TestBean.class);
		bean.helloSpring();
	}

}
